package com.xy.hms.log;

import org.springframework.aop.BeforeAdvice;
import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;

/**
 * @author xiaye
 * @create 2020-03-11-17:15
 *
 */

public class BeforeLog implements MethodBeforeAdvice {

    //method: 要执行的目标对象得方法
    //方法的参数
    //o：目标对象
    @Override
    public void before(Method method, Object[] objects, Object o) throws Throwable {
        System.out.println(o.getClass()+"执行了"+method.getName()+"方法");
    }
}
